Communication apparatus, communication method, and storage medium

ABSTRACT

A communication apparatus reads an image relating to a first other communication apparatus and acquires information on the first other communication apparatus from the image. The communication apparatus reads an image relating to a second other communication apparatus and acquires information on the second other communication apparatus from the image. The communication apparatus transmits information on a communication channel to the first other communication apparatus. The communication channel is for use in a role determination process for determining roles of the first other communication apparatus and the second other communication apparatus in direct wireless communication. The communication apparatus transmits the information on the communication channel and the information on the first other communication apparatus to the second other communication apparatus.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is the National Phase application of PCT ApplicationNo. PCT/JP2017/023335, filed on Jun. 26, 2017, and claims the benefit ofJapanese Patent Application No. 2016-130611, filed Jun. 30, 2016, whichapplications are hereby incorporated by reference herein in theirentireties.

TECHNICAL FIELD

The present disclosure relates to a communication technique.

BACKGROUND ART

Wi-Fi Direct (a registered trademark, hereinafter omitted) which definesspecifications for achieving direct wireless communication betweenterminals using a terminal equipped with a base station function isstandardized in Wi-Fi Alliance, which is an industry organization ofwireless LAN.

Wi-Fi Direct defines a method for determining the role of operating as abase station, a method for setting parameters for connecting to a deviceserving as the base station, and a method of connection among terminalsconforming to the standard.

Wi-Fi Direct defines a terminal device serving as the base station asP2P (peer-to-peer) GO (group owner), and a terminal device connected tothe P2P GO as a P2P client. In the process of determining P2P GO(hereinafter referred to as a GO determination process), Intent valuesindicating the priority of P2P GO are exchanged between the terminals todetermine a device serving as P2P GO. A device determined as P2P GOstarts a base station function to construct a wireless LAN, and a devicedetermines as the P2P Client acquires wireless parameters from the P2PGO to connect to the wireless LAN.

PTL 1 discloses facilitating a communication setting process using amechanism for setting wireless LAN parameters or the like by means of aQR code (a registered trademark, hereinafter omitted).

Using the method disclosed in PTL 1 facilitates direct communicationbetween terminal devices using Wi-Fi Direct or the like. However, usingthe method disclosed in J PTL 1 requires that at least one of thedevices has the function of reading the QR code. Therefore, devices thatdo not have the reading function cannot use the setting process usingthe QR code. Furthermore, in the case where both devices are fixedlyset, the devices cannot be moved to read the QR code. Also in that case,the setting process using the QR code cannot be used.

CITATION LIST Patent Literature

PTL 1: Japanese Patent Laid-Open No. 2014-60623

SUMMARY OF INVENTION

The present disclosure allows devices incapable of executing a necessaryreading function to directly communicate with each other wirelessly.

A communication apparatus according to a first aspect of the presentdisclosure includes a first reading unit, a first acquisition unit, asecond reading unit, a second acquisition unit, a first transmittingunit, and a second transmitting unit. The first reading unit isconfigured to read an image relating to a first other communicationapparatus. The first acquisition unit is configured to acquireinformation on the first other communication apparatus from the imageread by the first reading unit. The second reading unit is configured toread an image relating to a second other communication apparatus. Thesecond acquisition unit is configured to acquire information on thesecond other communication apparatus from the image read by the secondreading unit. The first transmitting unit is configured to transmitinformation on a communication channel to the first other communicationapparatus. The communication channel is for use in a role determinationprocess for determining roles of the first other communication apparatusand the second other communication apparatus in direct wirelesscommunication. The second transmitting unit is configured to transmitthe information on the communication channel transmitted by the firsttransmitting unit and the information on the first other communicationapparatus acquired by the first acquisition unit to the second othercommunication apparatus.

A communication apparatus according to second aspect of the presentdisclosure includes a receiving unit, a transmitting unit, and a waitingunit. The receiving unit is configured to receive setting informationfrom an apparatus that reads an image relating to the communicationapparatus. The setting information contains information on acommunication channel for use in a role determination process fordetermining roles of the communication apparatus and anothercommunication apparatus in wireless direct communication. Thetransmitting unit is configured, when the setting information receivedby the receiving unit contains information on the other communicationapparatus, to transmit a request to start the role determination processcontaining the information over the communication channel. The waitingunit is configured, when the setting information received by thereceiving unit does not contain the information on the othercommunication apparatus, to wait for a request to start the roledetermination process transmitted over the communication channel.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a hardware block diagram of a setting apparatus according toan embodiment of the present disclosure.

FIG. 2 is a hardware block diagram of a communication apparatusaccording to an embodiment of the present disclosure.

FIG. 3 is a software functional block diagram of the setting apparatus.

FIG. 4 is a software functional block diagram of the communicationapparatus.

FIG. 5 is a diagram illustrating a network configuration according to anembodiment of the present disclosure.

FIG. 6 is a flowchart illustrating the operation of the settingapparatus according to the present embodiment.

FIG. 7 is a flowchart illustrating the operation of the communicationapparatus according to the present embodiment.

FIG. 8 is a diagram illustrating the operational sequence among thesetting apparatus and the communication apparatuses according to thepresent embodiment.

DESCRIPTION OF EMBODIMENTS

A communication apparatus according to embodiments of the presentdisclosure will be described in detail hereinbelow with reference to thedrawings. Although the following is an example in which a wireless LANsystem conforming to Institute of Electrical and Electronics Engineers,Inc. (IEEE) 802.11 series is used, communication configuration is notlimited to the wireless LAN conforming to IEEE 802.11. It is to beunderstood that the technical scope of the present disclosure isdetermined by the claims and is not limited to the following individualembodiments.

FIG. 1 is a hardware block diagram illustrating an example of theconfiguration of a setting apparatus, to be described later, accordingto one embodiment. Reference sign 101 denotes the whole apparatus. Acontrol unit 102 is used to control the whole apparatus 101 by executinga control program stored in a storage unit 103. The control unit 102includes, for example, one or more central processing units (CPUs). Thecontrol unit 102 also performs setting control of communicationparameters with another apparatus. The storage unit 103 stores thecontrol program to be executed by the control unit 102 and variousinformation, such as communication parameters. Various operations to bedescribed later are performed by the control unit 102 executing thecontrol program stored in the storage unit 103. The storage unit 103 isa storage medium, such as a read-only memory (ROM), a random-accessmemory (RAM), a hard disk drive (HDD), a flash memory, or a detachableSD card.

A wireless communication unit 104 is used to perform wirelesscommunication, such as a wireless LAN conforming to the IEEE 802.11series. The wireless communication unit 104 includes a wirelesscommunication chip. One example of the wireless communication is ashort-distance wireless communication, such as Near Field Communication(a registered trademark, hereinafter referred to as NFC). A display unit105 is used to present various indications. The display unit 105 has afunction capable of outputting visually recognizable information, like aliquid crystal display (LCD) and a light-emitting diode (LED), andoutputting sound, like a speaker. The display unit 105 has the functionof outputting at least one of visual information and sound information.The display of a QR code is also performed by the display unit 105. Inaddition to the display by means of the display unit 105, the QR codemay also be bonded to the casing of the communication apparatus in theform of a seal or bonded to an instruction manual or the cardboardpackage of the communication apparatus at the time of delivery.Reference sign 106 denotes a wireless-LAN-antenna control unit, andreference sign 107 denotes a wireless LAN antenna. An input unit 108 isused by the user to operate the setting apparatus by making variousinputs or the like. An image capturing unit 109 serves as a reading unitthat reads a QR code or the like by image capture.

FIG. 2 is a hardware block diagram illustrating an example of theconfiguration of a communication apparatus, to be described later,according to the present embodiment. Reference sign 201 denotes thewhole apparatus. A control unit 202 is used to control the wholeapparatus 201 by executing a control program stored in a storage unit203. The control unit 202 includes, for example, one or more centralprocessing units (CPUs). The control unit 202 also performs settingcontrol of communication parameters with another apparatus. The storageunit 203 stores the control program to be executed by the control unit102 and various information, such as communication parameters. Variousoperations to be described later are performed by the control unit 202executing the control program stored in the storage unit 203. Thestorage unit 203 is a storage medium, such as a ROM, a RAM, a HDD, aflash memory, or a detachable SD card.

A wireless communication unit 204 is used to perform wirelesscommunication, such as a wireless LAN conforming to the IEEE 802.11series. The wireless communication unit 204 includes a wirelesscommunication chip. One example of the wireless communication is ashort-distance wireless communication, such as NFC. A display unit 205is used to present various indications. The display unit 105 has afunction capable of outputting visually recognizable information, likean LCD and an LED, and outputting sound, like a speaker. The displayunit 205 has the function of outputting at least one of visualinformation and sound information. The display of a QR code is alsoperformed by the display unit 205. In addition to the display by meansof the display unit 205, the QR code may also be bonded to the casing ofthe communication apparatus in the form of a seal or bonded to aninstruction manual or the cardboard package of the communicationapparatus at the time of delivery. Reference sign 206 denotes awireless-LAN-antenna control unit, and reference sign 207 denotes awireless LAN antenna. An input unit 208 is used by the user to operatethe communication apparatus by making various inputs or the like. Theconfiguration illustrated in FIG. 2 is given for illustration, and thecommunication apparatus may have another hardware configuration. Forexample, in the case where the communication apparatus is a printer, thecommunication apparatus may include a printing unit in addition to theconfiguration illustrated in FIG. 2 . In the case where thecommunication apparatus is a camera, the communication apparatus mayinclude an image capturing unit.

FIG. 3 is a block diagram illustrating the configuration of a softwarefunctional block of the setting apparatus that executes a communicationsetting function, to be described later, according to an embodiment ofthe present disclosure. In the present embodiment, each function of thesetting apparatus is stored as a program in the storage unit 103, andthe function is implemented by the control unit 102 executing theprogram. The control unit 102 implements each function by controllingeach hardware and calculating or processing information according to thecontrol program. Part or all of the functional blocks may be implementedby hardware. In this case, the part or all of the functional blocks isconstituted of, for example, an application specific integrated circuit(ASIC).

Reference sign 301 denotes the entire software functional block.Reference sign 302 denotes a communication-parameter providing unit. Thesetting apparatus serves as a communication-parameter providing sourceand generates and encodes communication parameters and provides thecommunication parameters to a target apparatus. The parameter providingprocess, to be described later, is performed by thecommunication-parameter providing unit 302. An authentication processingunit 303 performs authentication of the target apparatus using a QR codeinformation or the like that the setting apparatus acquires. Anauthentication process to be performed by the setting apparatus (to bedescribed later) is performed by the authentication processing unit 303.A wireless-LAN packet receiving unit 304 and a wireless-LAN packettransmitting unit 305 are used to perform wireless LAN communicationconforming to the IEEE802.11 standard with the target apparatus. A datastorage unit 306 is used to store the software itself, wireless LANparameters, authentication information, barcodes, and other information.The functional block is illustrative only. A plurality of functionalblocks may constitute one functional block or any of the functionalblocks may be divided into a plurality of functional blocks.

FIG. 4 is a block diagram illustrating the configuration of a softwarefunctional block of the communication apparatus that executes acommunication setting function, to be described later, according to anembodiment. In the present embodiment, each function of thecommunication apparatus is stored as a program in the storage unit 203,and the function is implemented by the control unit 202 executing theprogram. The control unit 202 implements each function by controllingeach hardware and calculating or processing information according to thecontrol program. Part or all of the functional blocks may be implementedby hardware. In this case, the part or all of the functional blocks isconstituted of, for example, an ASIC.

Reference sign 401 denotes the entire software functional block. Acommunication-parameter sharing unit 402 performs acommunication-parameter providing process, a communication-parameterreceiving process, a communication-parameter encrypting process, anencrypted-communication-parameter decrypting process, and so on. Theparameter providing process and the parameter receiving process, to bedescribed later, are performed by the communication-parameter sharingunit 402. An authentication processing unit 403 performs authenticationof the target apparatus using QR code information or the like containedin a received message. The authentication process to be performed by thesetting apparatus (to be described later) is performed by theauthentication processing unit 403. A network-construction processingunit 404 is used to construct or participating in a wireless LAN networkusing the received communication parameters. The network constructingprocess and the network participating process (to be described later)are performed by the network-construction processing unit 404. Awireless-LAN packet receiving unit 405 and a wireless-LAN packettransmitting unit 406 are used to perform wireless LAN communicationconforming to the IEEE802.11 standard with the target apparatus. A datastorage unit 407 is used to store the software itself, wireless LANparameters, authentication information, barcodes, and other information.The functional block is illustrative only. A plurality of functionalblocks may constitute one functional block or any of the functionalblocks may be divided into a plurality of functional blocks. FIG. 5illustrates a system configuration according to the present embodimentillustrating a smartphone 501, a printer 502, a notebook personalcomputer (PC) 503, and a wireless LAN 504 (hereinafter referred to as“network 504”).

In the present embodiment, the smartphone 501 reads the QR codes of theprinter 502 and the notebook PC 503, which are communicationapparatuses, as the setting apparatus and provides information necessaryfor a GO determination process to each communication apparatus. Theprinter 502 and the notebook PC 503 each perform a GO determinationprocess on the basis of the information received from the smartphone 501to construct the network 504 on the basis of a determined role. Theprinter 502 and the notebook PC 503 start direct communication over awireless LAN. The smartphone 501 is an example of the setting apparatus.The setting apparatus may be another apparatus. Examples includeprinters, cameras, PCs, digital TVs, various digital consumerelectronics, and wearable devices. Also the printer 502 and the notebookPC 503 are examples of the communication apparatus. The communicationapparatus may be another apparatus. Examples include printers, cameras,PCs, digital TVs, various digital consumer electronics, and wearabledevices. The setting apparatus is one kind of communication apparatus.However, in the present embodiment, an apparatus having a QR-codereading function is referred to as “setting apparatus” to distinguish itfrom a communication apparatus having no QR-code reading function.

In the present embodiment, the smartphone 501 serving as the settingapparatus has the configurations in FIG. 1 and FIG. 3 described above.The printer 502 and the notebook PC 503 serving as communicationapparatuses have the configurations in FIG. 2 and FIG. 4 describedabove.

FIG. 6 is a flowchart illustrating a process performed by the smartphone501. The process in FIG. 6 is started by the control unit 102 when aninstruction to start the process is given by user operation via thedisplay unit 105 and the input unit 108. The steps in FIG. 6 areperformed by the control unit 102 reading and executing the computerprogram stored in the storage unit 103.

After the process is started, the smartphone 501 prompts the user todetermine whether to carry on the process in “double mode” or in “triplemode” via the display unit 105 and the input unit 108 (S601). The“double mode” is a mode for the smartphone 501 to construct a networkbetween the smartphone 501 and another communication apparatus. The“triple mode” is a mode for the smartphone 501 to construct a networkbetween the smartphone 501 and two communication apparatuses, that is, afirst another communication apparatus and a second another communicationapparatus.

The smartphone 501 determines which mode is selected, and if the doublemode is selected (S602: No), reads the QR code of the target apparatusthat constructs the network together with the smartphone 501 (S603). Thesmartphone 501 then performs a process for sharing communicationparameters with the target apparatus using information acquired from theread QR code and thereafter constructs a network together with thetarget apparatus (S604).

The QR code that the smartphone 501 read at S603 may contain informationnecessary for constructing the network, such as a service set identifier(SSID) and a cryptographic key. The smartphone 501 may construct thenetwork using the information, such as SSID, acquired from the read QRcode. The QR code that the smartphone 501 read at S603 may containpublic key information, and the smartphone 501 may share thecommunication parameters with the target apparatus by public keycryptography using the public key. Furthermore, when the double mode isselected, the smartphone 501 may construct the wireless network byperforming Wi-Fi Direct with the target apparatus.

If in the determination at S602, the triple mode is selected (S602:Yes), the smartphone 501 reads the QR code of another communicationapparatus (for example, the printer 502). Then, the smartphone 501acquires information on a public key contained in the read QR code(S605). The information on the public key is one example of informationon the other communication apparatus. The information may not be thepublic key information but may be identification information, such asaddress information on or a universally unique identifier (UUID) of theother communication apparatus. After acquiring the public keyinformation, the smartphone 501 calculates the hash value of theacquired public key information and transmits an authentication requestcontaining the hash value to the other communication apparatus (S606).When the address of the other communication apparatus is specified fromthe read QR code, the smartphone 501 may transmit the authenticationrequest by unicast by specifying the address. When the address of theother communication apparatus cannot be specified, the smartphone 501may transmit the authentication request by broadcasting.

If the authentication request contains a correct hash value, so that theauthentication process has succeeded, then the smartphone 501 receivesan authentication response indicating that the authentication hassucceeded from the other communication apparatus (S607: Yes). If theauthentication process has failed such as when an incorrect hash valueis contained, the smartphone 501 receives an authentication responseindicating that authentication has failed from the other communicationapparatus (S607: No). If there is no response to the authenticationrequest for a fixed time, then the smartphone 501 determines that theauthentication process has failed. In that case, the smartphone 501presents an error indication on the display unit 105 to notify the userof the fail in processing and terminates the process (S608).

If the smartphone 501 has received the authentication responseindicating that the authentication has succeeded (S607: Yes), thesmartphone 501 calculates a cryptographic key by public key cryptographyand transmits an authentication confirmation to the other communicationapparatus (S609). The smartphone 501 and the other communicationapparatus enter a state of sharing a shared key for use in subsequentencryption processing. After the transmission, the smartphone 501 waitsfor a setting request transmitted from the other communication apparatus(S610).

If the smartphone 501 has received the setting request (S610: Yes), thesmartphone 501 checks the data storage unit 306 to determine whethercommunication parameters to be stored at step S614 (to be describedlater) are stored (S611). If the communication parameters are not stored(S611: No), the smartphone 501 selects a communication channel to beused by the other communication apparatus in a GO determination processas a communication parameter to be transmitted to the othercommunication apparatus (S612). The GO determination process is a roledetermination process for determining which of the apparatuses thatexecute Wi-Fi Direct serves as GO and which serves as CL, that is, GroupOwner Negotiation defined in Wi-Fi Direct. The GO determination processis one example of the role determination process for determining theroles of the first other communication apparatus and the second othercommunication apparatus in direct communication by radio. The rolesdefined in the role determination process are not limited to GO and CLin Wi-Fi Direct but may be a role as a provider that providescommunication parameters and a role as a receiver. Alternatively, theroles may be a role as a construction apparatus that participates in thewireless LAN, like an access point of a wireless LAN, and a role as aparticipating apparatus participating the constructed wireless LAN. AtS612, the smartphone 501 may select the communication channel from allavailable channels or from predetermined communication channels. Forexample, the smartphone 501 may select any communication channel from afirst to 11th channels available in a wireless LAN in a 2.4 GHz band.Alternatively, the smartphone 501 may select any communication channelfrom a first, sixth, and 11th channels defined as social channels inWi-Fi Direct.

After selecting the communication channel, the smartphone 501 encryptsthe communication parameters using the cryptographic key calculated atS609. The smartphone 501 incorporates the encrypted communicationparameters in a setting response and transmits the response to the othercommunication apparatus (S613). The communication parameters transmittedat that time include at least information on the communication channelselected at S612.

After transmitting the setting response, the smartphone 501 stores theinformation on the selected communication channel, the media accesscontrol address (MAC) address of the other communication apparatus, andthe acquired public key information in the storage unit 306 (S614).

After the storage, the smartphone 501 returns to the state in which theQR code can be photographed again to transmit the information stored atS614 to a further apparatus (for example, the notebook PC 503,hereinafter referred to as “second other communication apparatus”)(returns to S605). After storing the information at S614, the smartphone501 may present an indication prompting the user to take a picture ofthe QR code of the second other communication apparatus on the displayunit 105.

When the QR code of the second other communication apparatus is read bythe smartphone 501, the process from S605 to S611 described above isexecuted. If at S611 it is determined that the communication parametersare stored in the storage unit 306 (S611: Yes). The smartphone 501 readsthe communication channel information, the MAC address of the secondother communication apparatus, and the public key information stored inthe data storage unit 306 and encrypts them (S615). The smartphone 501incorporates the encrypted communication parameters in a settingresponse and transmits the setting response to the second othercommunication apparatus (S615). The communication parameters transmittedat that time include at least information on the communication channelselected at S612, information on the second other communicationapparatus (for example, the address information on the second othercommunication apparatus and public key information).

After the transmission, the smartphone 501 deletes the communicationchannel information, the MAC address of the second other communicationapparatus, and the public key information stored in the data storageunit 306 and terminates the process (S616).

At S616, the smartphone 501 may delete the stored information on thecondition that the setting response is transmitted to a predeterminednumber of other communication apparatuses. This allows, even if three ormore communication apparatuses participate in the network 504, the GOdetermination process to be promptly performed among the participatingcommunication apparatuses.

FIG. 7 is a flowchart illustrating a process performed by the printer502 or the notebook PC 503 (hereinafter referred to as “communicationapparatus”). In the present embodiment, the process in FIG. 7 is startedby the control unit 202 when the wireless LAN communication function ofthe communication apparatus is enabled, for example, at the timing whenthe apparatus is turned on. The process in FIG. 7 may be started by thecontrol unit 202 when processing start is selected by user operation viathe display unit 205 or the input unit 208. Alternatively, in the caseof an apparatus having the function of displaying a QR code on a displayunit, the process may be started when the QR code is displayed on thedisplay unit. The process in FIG. 7 is performed by the control unit 202reading and executing a computer program stored in the storage unit 203.

After the process is started, the communication apparatus waits for anauthentication request transmitted from the setting apparatus (S701).When receiving the authentication request, the communication apparatusdetermines whether a hash value contained in the authentication requestmatches a hash value in the public key information of the communicationapparatus (S702). If the hash values do not match (S702: No), thecommunication apparatus transmits an authentication response indicatingthat authentication has failed to the setting apparatus and terminatesthe process illustrated in FIG. 7 (S703). At S703, the communicationapparatus may present an error indication on the display unit 205. Atstep S703, after transmitting the authentication response, thecommunication apparatus may not terminate the process and return to S701to wait for an authentication request again. In that case, therepetitive process may be continued for a predetermined time. If thehash values match (S702: Yes), the communication apparatus transmits anauthentication response indicating that the authentication has succeededto the setting apparatus (S704) and waits for an authenticationconfirmation transmitted from the setting apparatus (S705).

If the communication apparatus has received the authenticationconfirmation (S705: Yes), the communication apparatus transmits asetting request to the setting apparatus (S706) and waits for a settingresponse (S707). If the communication apparatus has received the settingresponse (S707: Yes), the communication apparatus decrypts encryptedsetting information contained in the setting response using acryptographic key that the communication apparatus holds (S708). Thecommunication apparatus checks the contents of the decrypted settinginformation to determine whether the setting information contains anetwork identifier (SSID) (S709). If the network identifier is contained(S709: Yes), the communication apparatus connects to a wireless LANindicated by the network identifier contained in the setting informationand terminates the process illustrated in FIG. 7 (S710). At S710, thecommunication apparatus may connect to the wireless LAN using a wirelessLAN authentication method, an encryption method, or a cryptographic keycontained in the decrypted setting information.

If the decrypted setting information does not contain the SSID (S709:No), then the communication apparatus determines whether the decryptedsetting information contains information on a communication channel tobe used in the GO determination process (S711).

If the decrypted setting information does not contain the information onthe communication channel (S711: No), the communication apparatuspresents an error indication on the display unit 205 and terminates theprocess illustrated in FIG. 7 (S712). If the decrypted settinginformation contain the information on the communication channel (S711:Yes), the communication apparatus determines whether the decryptedsetting information further contains information on a public key and MACaddress information on a second other communication apparatus (S713).

If the decrypted setting information contain public key information andMAC address information (S713: Yes), the communication apparatus startsthe GO determination process and transmits a request to start a roledetermination process over the communication channel determined at S711(S714). The start request to be transmitted here may be transmitted tothe acquired MAC address by unicast. Alternatively, a start requestcontaining the acquired public key information or a hash value thereofmay be transmitted. This allows the second other apparatus that hasreceived the start request to recognize that the apparatus that hastransmitted the start request specifies the second other apparatus as aconnection target.

If the decrypted setting information does not contain the public keyinformation and the MAC address information (S713: No), then thecommunication apparatus starts the GO determination process and waitsfor a request to start the role determination process over thecommunication channel determined at S711 (S715). Afterwards, thecommunication apparatus executes a role determination process of Wi-FiDirect with the other communication apparatus and performs directcommunication over the wireless LAN.

FIG. 8 illustrates the sequence of a processing operation performedamong the smartphone 501, the printer 502, and the notebook PC 503.

The smartphone 501 starts the process of the flowchart in FIG. 6 inresponse to a user instruction to start a registration process (F801).The smartphone 501 than reads the QR code of the printer 502 to acquirepublic key information on the printer 502 (F802). The smartphone 501transmits an authentication request containing the hash value of theacquired public key information to the printer 502 (F803). Uponreception of the authentication request, the printer 502 performs theprocess of the flowchart in FIG. 7 to transmit an authenticationresponse indicating that the authentication has succeeded (F804). Uponreception of the authentication response, the smartphone 501 transmitsan authentication confirmation (F805). Then the smartphone 501 transmitsa setting response containing information on a communication channel tobe used in the GO determination process in response to the settingrequest (F806) received from the printer 502 (F807).

The printer 502 checks the details of the received setting response andwaits for a role determination request from a target apparatus (in thiscase, the notebook PC 503) over the communication channel contained inthe setting response (F807).

After transmitted the setting response at F807, the smartphone 501 readsthe QR code of the notebook PC 503 to acquire public key information onthe notebook PC 503 (F808). The smartphone 501 transmits anauthentication request containing the hash value of the received publickey information to the notebook PC 503 (F809). Upon reception of theauthentication request, the notebook PC 503 executes the process of theflowchart in FIG. 7 and transmits an authentication response indicatingthat the authentication has succeeded (F810).

Upon reception of the authentication response, the smartphone 501transmits an authentication confirmation (F811). The smartphone 501transmits a setting response containing information on the communicationchannel to be used in the GO determination process and the MAC addressand the public key information on the printer 502 in response to thesetting request (F812) received from the notebook PC 503 (F813). Thenotebook PC 503 stores the received communication channel informationand MAC address and public key information on the printer 502 in thedata storage unit 407.

The notebook PC 503 checks the details of the received setting responseand transmits a request to start the role determination process to theprinter 502 over the communication channel contained in the settingresponse (F814). Upon reception of the request to start the roledetermination process, the printer 502 determines P2P GO on the basis ofIntent value indicating the priority of P2P GO contained in the startrequest and transmits a role determination response to the notebook PC503 (F815). In the present embodiment, the notebook PC 503 is determinedas P2P GO.

After transmitting a role determination confirmation (F816), thenotebook PC 503 calculates the hash value of the public key informationon the printer 502 stored in the data storage unit 407 and transmits anauthentication request including the hash value to the printer 502(F817). Upon reception of the authentication request, the printer 502transmits an authentication response indicating that authentication hassucceeded (F818). Upon reception of the authentication response, thenotebook PC 503 transmits an authentication confirmation (F819).

Afterwards, the notebook PC 503 incorporates communication parametersnecessary for constructing the network 504 in a setting response andtransmits the setting response to the printer 502 (F821) in response tothe setting request received from the printer 502 (F820). Thecommunication parameters transmitted here includes at least one of aSSID serving as a network identifier, a cryptographic key, an encryptionmethod, an authentication key, and an authentication method. Aftertransmitting the setting response, the notebook PC 503 constructs thenetwork 504 as P2P GO on the basis of the transmitted communicationparameters. The printer 502 participates in the network 504 as a P2PClient (F822).

As described above, the present embodiment allows the printer 502 andthe notebook PC 503 to share the information on a communication channelover which the GO determination process is executed stably and promptlyusing the smartphone 501. This allows even apparatuses having no QR-codereading function to perform the GO determination process easier andfaster than before, improving user convenience.

Other Embodiments

In the above embodiment, the notebook PC 503 may transmit theauthentication request to be transmitted at F817 before transmitting therequest to start the role determination process at F814. In that case,the notebook PC 503 may determine P2P GO by transmitting the request tostart the role determination process after transmitting theauthentication confirmation to be transmitted at F819. This enables theprinter 502 to authenticate the notebook PC 503 by confirming that thehash values of the public key information match prior to the roledetermination process, further improving the security.

In the role determination process, the printer 502 may serve as P2P GO.In this case, the printer 502 may construct the network 504 on the basisof the communication parameters contained in the setting responsetransmitted at F821.

The above embodiment has been described as related to a configuration inwhich information for setting communication parameters is exchangedbetween apparatuses using photographed images of QR codes. Instead ofphotographing the QR codes, wireless communication, such as NFC orBluetooth (a registered trademark), may be used. Alternatively, wirelesscommunication, such as IEEE802.11ad or TransferJet (a registeredtrademark), maybe used.

In the above embodiment, the QR code is one example of an image read bythe setting apparatus. The image to be read is not limited to the QRcode but may be a one-dimensional barcode, a two-dimensional code otherthan the QR code, or another image.

In the above embodiment, the smartphone 501 may acquire the public keyinformation using a photographed image of the QR code from the printer502 and may acquire the public key information from the notebook PC 503using a method other than the QR code (for example, NFC). This allowstwo apparatuses, even if they are not ready for a common wirelesscommunication method other than wireless LAN communication, to performthe GO determination process via the smartphone 501 easier and fasterthan before.

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2016-130611, filed Jun. 30, 2016, which is hereby incorporated byreference herein in its entirety.

The invention claimed is:
 1. A communication apparatus comprising: oneor more processors; and one or more memories storing instructions, whenexecuted by the one or more processors, causing the communicationapparatus to function as: a first reading unit configured to read animage relating to a first other communication apparatus; a firstacquisition unit configured to acquire information on the first othercommunication apparatus from the image read by the first reading unit; asecond reading unit configured to read an image relating to a secondother communication apparatus; a second acquisition unit configured toacquire information on the second other communication apparatus from theimage read by the second reading unit; a first transmitting unitconfigured to transmit, based on acquisition of information by the firstacquisition unit, first information for identifying a frequency channelto be used in a role determination process to the first othercommunication apparatus; and a second transmitting unit configured totransmit, based on acquisition of information by the second acquisitionunit, the first information transmitted by the first transmitting unitand the information on the first other communication apparatus acquiredby the first acquisition unit to the second other communicationapparatus, wherein the role determination process for determining rolesof the first other communication apparatus and the second othercommunication apparatus in direct wireless communication is performedover the frequency channel identified by the first information, withoutsearch over a channel different from the identified frequency channelbeing performed.
 2. The communication apparatus according to claim 1,wherein the information on the first other communication apparatuscomprises information on a public key of the first other communicationapparatus.
 3. The communication apparatus according to claim 1, whereinthe information on the first other communication apparatus comprisesaddress information on the first other communication apparatus.
 4. Thecommunication apparatus according to claim 1, wherein the one or morememories storing instructions, when executed by the one or moreprocessors, causes the communication apparatus to further function as astorage unit configured to store the first information and theinformation on the first other communication apparatus after the firsttransmitting unit transmits the first information to the first othercommunication apparatus.
 5. The communication apparatus according toclaim 4, wherein the one or more memories storing instructions, whenexecuted by the one or more processors, causes the communicationapparatus to further function as a deleting unit configured to deletethe information stored by the storage unit after the second transmittingunit transmits the first information and the information on the firstother communication apparatus.
 6. A communication apparatus comprising:one or more processors; and one or more memories storing instructions,when executed by the one or more processors, causing the communicationapparatus to function as: a receiving unit configured to receive settinginformation from an apparatus that reads an image relating to thecommunication apparatus, the setting information containing firstinformation for identifying a frequency channel to be used in a roledetermination process; a transmitting unit configured, in a case wherethe setting information received by the receiving unit containsinformation on another communication apparatus, to transmit a request tostart the role determination process over the frequency channel which isidentified by the first information, the request containing theinformation on another communication apparatus; and a waiting unitconfigured, in a case where the setting information received by thereceiving unit does not contain the information on the othercommunication apparatus, to wait for the request to start the roledetermination process transmitted over the frequency channel which isidentified by the first information, wherein the role determinationprocess including the transmission of the request and the waiting of therequest for determining roles of the communication apparatus and theother communication apparatus in direct wireless communication isperformed over the frequency channel which is identified by the firstinformation, without search over a channel different from the frequencychannel which is identified by the first information being performed. 7.The communication apparatus according to claim 6, wherein the one ormore memories storing instructions, when executed by the one or moreprocessors, causes the communication apparatus to further function as aconnecting unit configured, when the setting information received by thereceiving unit contains a network identifier, to connect to a wirelessnetwork identified by the network identifier.
 8. The communicationapparatus according to claim 6, wherein the information on the othercommunication apparatus comprises information on a public key of theother communication apparatus.
 9. The communication apparatus accordingto claim 1, wherein the role determination process comprises Group OwnerNegotiation defined in Wi-Fi Direct.
 10. The communication apparatusaccording to claim 1, wherein the image is a barcode or atwo-dimensional code.
 11. A communication method comprising: a firstreading step of reading an image relating to a first communicationapparatus; a first acquisition step of acquiring information on thefirst communication apparatus from the image read at the first readingstep; a second reading step of reading an image relating to a secondcommunication apparatus; a second acquisition step of acquiringinformation on the second communication apparatus from the image read atthe second reading step; a first transmitting step of transmitting,based on acquisition of information by the first acquisition step, firstinformation for identifying a frequency channel to be used in a roledetermination process to the first communication apparatus; and a secondtransmitting step of transmitting, based on acquisition of informationby the second acquisition step, the first information transmitted at thefirst transmitting step and the information on the first communicationapparatus acquired at the first acquisition step to the secondcommunication apparatus, wherein the role determination process fordetermining roles of the first communication apparatus and the secondcommunication apparatus in direct wireless communication is performedover the frequency channel identified by the first information, withoutsearch over a channel different from the identified frequency channelbeing performed.
 12. A communication method comprising the steps of:receiving setting information from an apparatus that reads an imagerelating to a communication apparatus, the setting informationcontaining first information for identifying a frequency channel to beused in a role determination process; in a case where the settinginformation received at the receiving step contains information onanother communication apparatus, transmitting a request to start therole determination process over the frequency channel which isidentified by the first information, the request containing theinformation on another communication apparatus; and in a case where thesetting information received at the receiving step does not contain theinformation on the other communication apparatus, waiting for therequest to start the role determination process transmitted over thefrequency channel which is identified by the first information, whereinthe role determination process including the transmission of the requestand the waiting of the request for determining roles of thecommunication apparatus and the other communication apparatus in directwireless communication is performed over the frequency channel which isidentified by the first information, without search over a channeldifferent from the frequency channel which is identified by the firstinformation being performed.
 13. The communication apparatus accordingto claim 6, wherein the role determination process comprises Group OwnerNegotiation defined in Wi-Fi Direct.
 14. The communication apparatusaccording to claim 6, wherein the image is a barcode or atwo-dimensional code.
 15. A non-transitory computer-readable storagemedium storing a program for causing a communication apparatus toexecute a communication method, the communication method comprising: afirst reading step of reading an image relating to a first communicationapparatus; a first acquisition step of acquiring information on thefirst communication apparatus from the image read at the first readingstep; a second reading step of reading an image relating to a secondcommunication apparatus; a second acquisition step of acquiringinformation on the second communication apparatus from the image read atthe second reading step; a first transmitting step of transmitting,based on acquisition of information by the first acquisition step, firstinformation for identifying a frequency channel to be used in a roledetermination process to the first communication apparatus; and a secondtransmitting step of transmitting, based on acquisition of informationby the second acquisition step, the first information transmitted at thefirst transmitting step and the information on the first communicationapparatus acquired at the first acquisition step to the secondcommunication apparatus, wherein the role determination process fordetermining roles of the first communication apparatus and the secondcommunication apparatus in direct wireless communication is performedover the frequency channel identified by the first information, withoutsearch over a channel different from the identified frequency channelbeing performed.
 16. A non-transitory computer-readable storage mediumstoring a program for causing a communication apparatus to execute acommunication method, the communication method comprising the step of:receiving setting information from an apparatus that reads an imagerelating to a communication apparatus, the setting informationcontaining first information for identifying a frequency channel to beused in a role determination process; in a case where the settinginformation received at the receiving step contains information onanother communication apparatus, transmitting a request to start therole determination process over the frequency channel which isidentified by the first information, the request containing theinformation on another communication apparatus; and in a case where thesetting information received at the receiving step does not contain theinformation on the other communication apparatus, waiting for therequest to start the role determination process transmitted over thefrequency channel which is identified by the first information, whereinthe role determination process including the transmission of the requestand the waiting of the request for determining roles of thecommunication apparatus and the other communication apparatus in directwireless communication is performed over the frequency channel, withoutsearch over a channel different from the frequency channel which isidentified by the first information being performed.
 17. Thecommunication apparatus according to claim 1, wherein the first othercommunication apparatus and the second other communication apparatustransmit or wait a request to start the role determination process overthe frequency channel which is identified by the first information. 18.The communication apparatus according to claim 1, wherein, in the roledetermination process, Group Owner and Client in Wi-Fi Direct aredetermined.
 19. The communication apparatus according to claim 1,wherein, in the role determination process, a providing apparatus forproviding a communication parameter and a receiving apparatus forreceiving the communication parameter are determined.
 20. Thecommunication apparatus according to claim 6, wherein, in the roledetermination process, Group Owner and Client in Wi-Fi Direct aredetermined.